<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>&#123;&#123;select&#125;&#125; tag example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<h1 align="center">&#123;&#123;select&#125;&#125; tag example</h1>

<h2>Description:</h2>
This page demonstrates how to use &#123;&#123;select&#125;&#125; tag. We will show how to fill options list in different ways.

<h2>Options are listed in the template</h2>

{{form name='my_form1' method='POST' from='$#my_form1'}}

<? if(isset($this->my_form1['my_select1'])) { ?>
<p>You selected: {$#my_form1.my_select1}</p>
<? } ?>

Select an option: {{select name='my_select1' type='text'}}
                     {{option value='no_value' selected='true' }}------{{/option}}
                     {{option value='first'}}First option{{/option}}
                     {{option value='second'}}Second option{{/option}}
                  {{/select}}

<input type='submit' name='button' value='Send!'/>
{{/form}}

<h2>Options are passed into runtime select helper from php-script</h2>

{{form name='my_form2' method='POST' from='$#my_form2'}}

<? if(isset($this->my_form2['my_select2'])) { ?>
<p>You selected: {$#my_form2.my_select2}</p>
<? } ?>

Select an option: {{select name='my_select2' type='text' options='$#options'/}}

<input type='submit' name='button' value='Send!'/>
{{/form}}


</body>
</html>
